Skip to content

feat(evm): allow gas bumping on contract.NewWrite#1057

Merged
graham-chainlink merged 1 commit into
mainfrom
ggoh/CLD-2779/evm-write-gas-boost-retry
Jun 17, 2026
Merged

feat(evm): allow gas bumping on contract.NewWrite#1057
graham-chainlink merged 1 commit into
mainfrom
ggoh/CLD-2779/evm-write-gas-boost-retry

Conversation

@graham-chainlink

Copy link
Copy Markdown
Collaborator

contract.NewWrite is used by operations-gen in the generated code, we also want to support gas bumping here

@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d23ef79

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chainlink-deployments-framework Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the chain/evm/operations2/contract write operation flow so that contract writes created via contract.NewWrite can participate in gas-boosting retry behavior (similar to deploys), enabling “bump gas and retry” semantics for operations-gen generated write operations.

Changes:

  • Updated contract.NewWrite to apply gas limit/price overrides (when executing directly) via deployTransactOpts(...).
  • Added RetryWriteWithGasBoost execute option to bump FunctionInput gas fields on gas-related retryable errors (skipping ZkSync VM chains).
  • Expanded FunctionInput to include GasLimit / GasPrice fields, and added tests for the new retry helper.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
chain/evm/operations2/contract/write.go Applies gas overrides to write transact opts when execution is allowed.
chain/evm/operations2/contract/gas_boost.go Adds RetryWriteWithGasBoost helper for gas-bumping retries on writes.
chain/evm/operations2/contract/gas_boost_test.go Adds unit tests validating retry + gas limit bump behavior for writes.
chain/evm/operations2/contract/function.go Extends write/read input struct with optional gas override fields.
.changeset/fast-rules-sneeze.md Declares a minor release entry for the new feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread chain/evm/operations2/contract/function.go Outdated
Comment thread chain/evm/operations2/contract/gas_boost.go
Comment thread chain/evm/operations2/contract/gas_boost.go
@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-2779/evm-write-gas-boost-retry branch from a37b493 to dcd1601 Compare June 17, 2026 08:04
@graham-chainlink graham-chainlink marked this pull request as ready for review June 17, 2026 08:05
@graham-chainlink graham-chainlink requested a review from a team as a code owner June 17, 2026 08:05
Copilot AI review requested due to automatic review settings June 17, 2026 08:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread chain/evm/operations2/contract/write.go
contract.NewWrite is used by operations-gen in the generated code, we also want to support gas bumping here
@graham-chainlink graham-chainlink force-pushed the ggoh/CLD-2779/evm-write-gas-boost-retry branch from dcd1601 to d23ef79 Compare June 17, 2026 08:11
@cl-sonarqube-production

Copy link
Copy Markdown

@graham-chainlink graham-chainlink added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit 5d53085 Jun 17, 2026
29 checks passed
@graham-chainlink graham-chainlink deleted the ggoh/CLD-2779/evm-write-gas-boost-retry branch June 17, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants